#ifndef READTHREAD_H
#define READTHREAD_H

#include <QThread>
#include <QString>

class ReadThread : public QThread
{
    Q_OBJECT
public:
    explicit ReadThread(int fd, QObject *parent = nullptr);

signals:
    void newData(QString line);
    void connectionClosed(); // 新增断开信号

protected:
    void run() override;

private:
    int m_fd;
};

#endif // READTHREAD_H



